package com.vhall.component.service.pay;


import com.vhall.component.entity.pay.entity.PaymentOrderEntity;

import java.time.LocalDateTime;

/**
 * @author xuyongzheng
 * @since 2020/10/22
 **/
public interface PaymentOrderService {
    PaymentOrderEntity create(PaymentOrderEntity entity);

    PaymentOrderEntity findByBizOrderId(String bizOrderNo);

    int updateOpenId(String bizOrderNo, String openId);

    int updateById(PaymentOrderEntity entity);

    /**
     * 付款成功, 修改参数
     *
     * @param bizNo       内部订单号
     * @param tradeNo     支付宝订单号
     * @param channel     渠道
     * @param serviceCode 类型
     * @param payTime     到账时间
     * @return effect row
     */
    int doPayed(String bizNo, String tradeNo, String channel, String serviceCode, LocalDateTime payTime);

}
